using System;
using System.Drawing;
using System.Windows.Forms;
using System.Collections;
using System.Collections.Generic;

namespace Nate.GUI.Canvas.Component
{
    public class NavMeshSelect : IComponent
    {
        public NavMeshSelect(NavMesh navmesh_canvas)
        {
            _navmesh_canvas = navmesh_canvas;
        }

        public void InitializeComponent()
        {
            _navmesh_canvas.MouseClick += new MouseEventHandler(_MouseClick);
        }

        public void Tick()
        {
        }

        private void _MouseClick(object sender, MouseEventArgs e)
        {
            if (MouseButtons.Right == e.Button)
            {
                NavMesh.Edge edge = null;
                _navmesh_canvas.Bucket.Find(new PointF((float)e.Location.X, (float)e.Location.Y), out edge);


                // Split this edge
            }
        }

        private NavMesh _navmesh_canvas;
    }
}